package com.greyu.ysj.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 
 */
public class CbtRecharge implements Serializable {
    private Integer id;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 币ID
     */
    private Integer coinId;

    /**
     * 充值时间
     */
    private Date rechargeDate;

    /**
     * 充值数额
     */
    private Double amount;

    /**
     * 区块号
     */
    private Integer blockNum;

    /**
     * 钱包地址
     */
    private String walletAddress;

    /**
     * 交易备注，用于eos交易备注信息
     */
    private String txRemarks;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getCoinId() {
        return coinId;
    }

    public void setCoinId(Integer coinId) {
        this.coinId = coinId;
    }

    public Date getRechargeDate() {
        return rechargeDate;
    }

    public void setRechargeDate(Date rechargeDate) {
        this.rechargeDate = rechargeDate;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Integer getBlockNum() {
        return blockNum;
    }

    public void setBlockNum(Integer blockNum) {
        this.blockNum = blockNum;
    }

    public String getWalletAddress() {
        return walletAddress;
    }

    public void setWalletAddress(String walletAddress) {
        this.walletAddress = walletAddress;
    }

    public String getTxRemarks() {
        return txRemarks;
    }

    public void setTxRemarks(String txRemarks) {
        this.txRemarks = txRemarks;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CbtRecharge other = (CbtRecharge) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getCoinId() == null ? other.getCoinId() == null : this.getCoinId().equals(other.getCoinId()))
            && (this.getRechargeDate() == null ? other.getRechargeDate() == null : this.getRechargeDate().equals(other.getRechargeDate()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getBlockNum() == null ? other.getBlockNum() == null : this.getBlockNum().equals(other.getBlockNum()))
            && (this.getWalletAddress() == null ? other.getWalletAddress() == null : this.getWalletAddress().equals(other.getWalletAddress()))
            && (this.getTxRemarks() == null ? other.getTxRemarks() == null : this.getTxRemarks().equals(other.getTxRemarks()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getCoinId() == null) ? 0 : getCoinId().hashCode());
        result = prime * result + ((getRechargeDate() == null) ? 0 : getRechargeDate().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getBlockNum() == null) ? 0 : getBlockNum().hashCode());
        result = prime * result + ((getWalletAddress() == null) ? 0 : getWalletAddress().hashCode());
        result = prime * result + ((getTxRemarks() == null) ? 0 : getTxRemarks().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", coinId=").append(coinId);
        sb.append(", rechargeDate=").append(rechargeDate);
        sb.append(", amount=").append(amount);
        sb.append(", blockNum=").append(blockNum);
        sb.append(", walletAddress=").append(walletAddress);
        sb.append(", txRemarks=").append(txRemarks);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}